package com.zj.eswrapper.wrapper;

import com.zj.eswrapper.interfaces.IGetter;
import com.zj.eswrapper.interfaces.field.ILambdaField;
import com.zj.eswrapper.interfaces.impl.AbstractEsSearchWrapper;
import org.elasticsearch.search.builder.SearchSourceBuilder;

/**
 * es7分页以及排序等条件拼接器
 *
 * @author 19242
 */
public class EsLambdaSearchWrapper<DO>
        extends AbstractEsLastSearchWrapper<IGetter<DO>, EsLambdaSearchWrapper<DO>>
        implements ILambdaField<DO, EsSearchWrapper<DO>> {

    public EsLambdaSearchWrapper(SearchSourceBuilder searchSourceBuilder) {
        super(searchSourceBuilder);
    }

    public EsLambdaSearchWrapper(AbstractEsSearchWrapper<?, ?, SearchSourceBuilder> searchWrapper) {
        super(searchWrapper);
    }

    @Override
    public EsSearchWrapper<DO> simple() {
        return new EsSearchWrapper<>(this);
    }

}
